package com.yxcz.dao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;

public interface CommonDAO<T, PK extends Serializable>  {
	
	public void add(T entity) throws Exception;
	public ArrayList<T> list(); 
	public T find(PK id);
	public void delete(T entity);  
	public void save(T entity); 
	List query(String sql, HashMap<String,Object> vars);
	public EntityManager getEntityManager();

}
